﻿
namespace SistemaLogistica.Business.Logic
{
    using System;
    using System.Collections.Generic;
    using SistemaLogistica.Business.Entities;
    using SistemaLogistica.DataAccess;

    public class VehiculoManager
    {
        private VehiculoManager() { }

        private static readonly VehiculoManager instancia = new VehiculoManager();

        public static VehiculoManager Instancia
        {
            get { return instancia; }
        }

        public List<Vehiculo> Listar()
        {
            try
            {
                return VehiculoData.Instancia.Listar();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public List<Vehiculo> Buscar(string numero)
        {
            try
            {
                return VehiculoData.Instancia.Buscar(numero);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public List<VehiculoPropio> ListarPropios()
        {
            try
            {
                return VehiculoData.Instancia.ListarPropios();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public List<VehiculoAlquilado> ListarAlquilados()
        {
            try
            {
                return VehiculoData.Instancia.ListarAlquilados();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public List<VehiculoPropio> BuscarPropio(string nroPlaca)
        {
            try
            {
                return VehiculoData.Instancia.BuscarPropio(nroPlaca);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public Vehiculo ObtenerPorDescripcion(string descripcion)
        {
            try
            {
                return VehiculoData.Instancia.ObtenerPorDescripcion(descripcion);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public List<VehiculoAlquilado> BuscarAlquilado(string nroPlaca)
        {
            try
            {
                return VehiculoData.Instancia.BuscarAlquilado(nroPlaca);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public VehiculoAlquilado BuscarAlquiladoFull(string descripcion)
        {
            try
            {
                return VehiculoData.Instancia.BuscarAlquiladoFull(descripcion);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public Vehiculo ObtenerPorID(int idBien)
        {
            try
            {
                return VehiculoData.Instancia.ObtenerPorID(idBien);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public Vehiculo ObtenerPorNroPlaca(string nroPlaca)
        {
            try
            {
                return VehiculoData.Instancia.ObtenerPorNroPlaca(nroPlaca);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void AgregarPropio(VehiculoPropio vehiculo)
        {
            try
            {
                VehiculoData.Instancia.AgregarPropio(vehiculo);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void AgregarAlquilado(VehiculoAlquilado vehiculo)
        {
            try
            {
                VehiculoData.Instancia.AgregarAquilado(vehiculo);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void ModificarPropio(VehiculoPropio vehiculo)
        {
            try
            {
                VehiculoData.Instancia.ModificarPropio(vehiculo);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void ModificarAlquilado(VehiculoAlquilado vehiculo)
        {
            try
            {
                VehiculoData.Instancia.ModificarAlquilado(vehiculo);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void Eliminar(int idVehiculo)
        {
            try
            {
                VehiculoData.Instancia.Eliminar(idVehiculo);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
